#pragma once

class CStackDS: public CObject
{
public:
	CStackDS(int nBlockSize = 16);
	virtual ~CStackDS(void);
	BYTE Pop(void);
	void Push(BYTE value);
	int GetCount();
	BYTE GetAt(int n);
	BYTE GetHead();
	void SetCleanOnPop(BOOL value);
	void CleanToFit();
#ifdef _DEBUG
	void Dump(CDumpContext &dc);
#endif

protected:
	PBYTE Buffer;
	int Pointer;
	const int BlockSize;
	int BlockCount;
	BOOL CleanOnPop;
public:
	BOOL IsEmpty(void);
};
